{include file="public/header" /}
<style>
    .content img {
        transition-duration: 0.5s;
    }

    .content img:hover {
        transform: scale(4);
    }

    .content .imageframe {
        width: 200px;
        height: 113px;
        overflow: hidden;
    }
</style>


<div class="page">
    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <thead>
            <tr>
                <th colspan="20">基本信息</th>
            </tr>
        </thead>
        <tbody>
            <!--            <tr>
               <th>用户名：</th>
               <td>{$joinin_detail.member_name}</td>
               <th>昵称：</th>
               <td>{$joinin_detail.member_nickname}</td>
               <th>QQ：</th>
               <td>{$joinin_detail.member_qq}</td>
           </tr>
           <tr>
               <th>账号状态：</th>
               <td>{$detail[$joinin_detail['member_state']]}</td>
               <th>注册时间：</th>
               <td>{$joinin_detail.member_addtime|date="Y-m-d H:i:s",###}</td>
               <th>申请认证时间：</th>
               <td>{$joinin_detail.enterprise_time|date="Y-m-d H:i:s",###}</td>
           </tr>
           <tr>
               <th>登录次数：</th>
               <td>{$joinin_detail.member_loginnum}</td>
               <th>最后登录时间：</th>
               <td>{$joinin_detail.member_old_logintime|date="Y-m-d H:i:s",###}</td>
               <th>最后登录时间ip：</th>
               <td>{$joinin_detail.member_login_ip}</td>
           </tr> -->
            <tr>
                <th>企业名称：</th>
                <td>{$joinin_detail.enterprise_name}</td>
                <th>企业类型：</th>
                <td>{$joinin_detail.name}</td>
                <th>联系人职位：</th>
                <td>{$joinin_detail.contact_title}</td>
            </tr>

            <tr>
                <th>联系人姓名：</th>
                <td>{$joinin_detail.contact_name}</td>
                <th>联系人电话：</th>
                <td>{$joinin_detail.contact_phone}</td>
                <th>联系人座机：</th>
                <td>{$joinin_detail.contact_landline}</td>
            </tr>
            <tr>
                <th>联系人地址：</th>
                <td>{$joinin_detail.contact_address}</td>
            </tr>
        </tbody>
    </table>

    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <thead>
            <tr>
                <th colspan="20">文件信息：</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <th class="w150">企业营业执照：</th>
                <td>
                    {notempty name="pic"}
                    <div class="content">
                        {foreach name="pic" item="val"}
                        <span class="thumb size-56x56 imageframe">
                            <img style="width: 100px;height: 100px;margin-left: 20px;" src="{$val}"
                                onload="javascript:ResizeImage(this,56,56);" />
                        </span>
                        {/foreach}
                    </div>
                    {/notempty}
                </td>
            </tr>
        </tbody>
    </table>

    <form id="form_store_verify" action="{:url('Member/enterprise_verify')}" method="post">
        <input id="verify_type" name="verify_type" type="hidden" />
        <input name="member_id" type="hidden" value="{$joinin_detail.member_id}" />
        <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
            <thead>
                <tr>
                    <th colspan="20">用户信息</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <th class="w150">用户名：</th>
                    <td>{$joinin_detail.member_name}</td>
                </tr>
                <tr>
                    <th>注册时间：</th>
                    <td>{$joinin_detail.member_addtime|date="Y-m-d H:i:s",###}</td>
                </tr>
                <tr>
                    <th>申请认证时间：</th>
                    <td>{$joinin_detail.enterprise_time|date="Y-m-d H:i:s",###}</td>
                </tr>
                {if $is_verify == true}
                <tr class="noborder">
                    <th>审核状态：</th>
                    <td class="vatop rowform onoff" style="overflow: hidden;width: auto;">
                        <label for="rewrite_enabled_1" class="cb-enable selected"
                               title="{$Think.lang.ds_yes}>"><span>通过</span></label>
                        <label for="rewrite_disabled_2" class="cb-disable"
                               title="{$Think.lang.ds_no}"><span>拒绝</span></label>
                        <input id="rewrite_enabled_1" name="verify_state" value="1" type="radio" checked="checked">
                        <input id="rewrite_disabled_2" name="verify_state" value="0" type="radio">
                    </td>
                </tr>
                <tr dstype="reason" style="display: none;">
                    <th>拒绝理由：</th>
                    <td colspan="2"><textarea style="width: 250px;height:150px;" id="joinin_message"
                            name="joinin_message"></textarea>
                        <div id="validation_message" style="color:red;display:none;"></div>
                    </td>
                </tr>
                {/if}
                {if $is_verify == false}
                <tr>
                    <th>拒绝理由：</th>
                    <td colspan="2"><textarea style="width: 250px;height:150px;" id="joinin_message"
                            name="joinin_message">{$joinin_detail.reasons}</textarea>
                        <div id="validation_message" style="color:red;display:none;"></div>
                    </td>
                </tr>
                {/if}
            </tbody>
        </table>

        {if $is_verify == true}
        <div style="text-align: center;"><a id="Submission" class="btn"
                href="JavaScript:void(0);"><span>提交</span></a>
           </div>
        {/if}
    </form>
</div>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('input[name="verify_state"]').click(function () {

            if ($(this).val() == 1) {
                $('tr[dstype="reason"]').hide();
            } else {
                $('tr[dstype="reason"]').show();
            }
        });
        $('#Submission').on('click', function () {
            var status = $('input:radio[name="verify_state"]:checked').val();
            if (status != 1){
                if ($('#joinin_message').val() == '') {
                    layer.msg('请填写拒绝理由');
                    return false;
                }
            }
            $('#form_store_verify').submit();
        });

    });
</script>